#include<iostream>
#include<unistd.h>
#include"ThreadPool.hpp"
using namespace std;

void taskFunction(void* args){
    int num=*(static_cast<int*>(args));
    cout<<"Task executing: "<<num<<endl;
}
int main()
{
    ThreadPool pool(4);
    for(int i=0;i<10;i++){
        int* args=new int(i);
        pool.addTask(taskFunction,(void*)args);
    }
    sleep(3);
    pool.stop();
    return 0;
}